import 'package:dio/dio.dart';
import 'package:json_annotation/json_annotation.dart';
import 'package:retrofit/retrofit.dart';

part 'retrofitdemo2.g.dart';

@RestApi(baseUrl: 'https://5d42a6e2bc64f90014a56ca0.mockapi.io/api/v1/')
abstract class RestClientLsqboy {
  factory RestClientLsqboy(Dio dio, {String baseUrl}) = _RestClientLsqboy;
  @GET('lsqboy/tasks2222')
  Future<List<Task22>> getDetail();
}

@JsonSerializable()
class Task22 {
  const Task22({this.fId, this.fName, this.avatar, this.createdAt});

  factory Task22.fromJson(Map<String, dynamic> json) => _$Task22FromJson(json);

  final String? fId;
  final String? fName;
  final String? avatar;
  final String? createdAt;

  Map<String, dynamic> toJson() => _$Task22ToJson(this);
}